home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
pcboard
/
bcmx120.zip
/
PAGE.PPE
(
.txt
)
< prev
next >
Wrap
PCBoard Programming Language Executable
|
1994-07-07
|
6KB
|
448 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Boolean BOOLEAN001
Boolean BOOLEAN002
Boolean BOOLEAN003
Boolean BOOLEAN004
Boolean BOOLEAN005
Boolean BOOLEAN006
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
Integer INTEGER004
Integer INTEGER005
Integer INTEGER006
Integer INTEGER007
Integer INTEGER008
Integer INTEGER009
Integer INTEGER010
Integer INTEGER011
Integer INTEGER012
Integer INTEGER013
Integer INTEGER014
Integer INTEGER015
Integer INTEGER016
String STRING001
String STRING002
String STRING003
String STRING004
String STRING005
String STRING006
String STRING007
String STRING008
String STRING009
String STRING010
String STRING011
String STRING012
String STRING013
String STRING014
String STRING015
String STRING016
String STRING017
String STRING018
String STRING019
String STRING020
String TSTRING021(1)
String STRING022
String STRING023
String STRING024
String STRING025
String STRING026
String STRING027
String STRING028
String STRING029
Time TIME001
Time TIME002
Time TIME003
;------------------------------------------------------------------------------
BOOLEAN001 = 0
STRING001 = PPEPath() + "graph\pgsys"
STRING020 = PPEPath() + "page.cfg"
STRING022 = ReadLine(STRING020, 5)
Tokenize STRING022
INTEGER009 = TokCount()
Redim TSTRING021, INTEGER009
For INTEGER010 = 1 To INTEGER009
STRING013 = GetToken()
If (STRING013 == "") Break
TSTRING021(INTEGER010) = STRING013
Next
STRING023 = PPEPath() + "cfg\pgmenus.cfg"
Tokenize ReadLine(STRING023, 1)
INTEGER012 = GetToken()
INTEGER015 = GetToken()
INTEGER011 = Random(Time())
INTEGER011 = Random(INTEGER012 - 1) + 1
Tokenize ReadLine(STRING023, 1 + INTEGER011)
INTEGER013 = GetToken()
INTEGER014 = GetToken()
STRING002 = TokenStr()
GetUser
BOOLEAN006 = 1
BOOLEAN002 = 1
STRING027 = PPEPath() + "graph\pgtext"
STRING026 = PPEPath() + "work\mxlog." + String(PcbNode())
INTEGER006 = ReadLine(STRING020, 1)
If (Upper(ReadLine(STRING020, 2)) == "YES") Then
BOOLEAN004 = 1
Else
BOOLEAN004 = 0
Endif
STRING029 = PPEPath() + "mx.cfg"
If (BOOLEAN004) Then
If (LoggedOn()) Goto LABEL001
If (Exist(STRING029)) Then
If (Upper(ReadLine(STRING029, 3)) == "YES") Then
FAppend 3, STRING026, 1, 0
Goto LABEL001
Endif
BOOLEAN004 = 0
Endif
Endif
:LABEL001
STRING015 = ReadLine(STRING020, 3)
If (Upper(ReadLine(STRING020, 4)) == "YES") Then
BOOLEAN005 = 0
Else
BOOLEAN005 = 1
Endif
If (BOOLEAN004) Then
STRING028 = "Page started at " + String(Time())
Gosub LABEL013
Endif
If (LangExt() <> "") Then
If (Exist(STRING027 + LangExt())) Then
STRING027 = STRING027 + LangExt()
Endif
Endif
STRING014 = ReadLine(STRING027, 1)
STRING005 = ReadLine(STRING027, 2)
STRING006 = ReadLine(STRING027, 3)
TIME001 = Time()
TIME002 = ReadLine(PCBDat(), 189)
TIME003 = ReadLine(PCBDat(), 190)
STRING018 = FileInf(PCBDat(), 7) + "pcboard.sys"
FOpen 1, STRING018, 0, 0
FSeek 1, 4, 0
FRead 1, STRING017, 2
FClose 1
INTEGER007 = STRING017
Select Case (INTEGER007)
Case 0
BOOLEAN003 = 0
Case -1
BOOLEAN003 = 1
Case Else
PrintLn "ERROR: cannot determine page bell status, defaulting to true"
BOOLEAN003 = 1
Wait
End Select
STRING007 = Chr(7)
STRING008 = Chr(13)
STRING009 = Chr(27)
STRING010 = Chr(27) + "["
STRING011 = STRING010 + "0;0H"
STRING012 = STRING010 + "K"
DefColor
Cls
If (BOOLEAN003) Then
If (((TIME002 > TIME003) && !((TIME001 > TIME003) && (TIME001 < TIME002))) || ((TIME003 > TIME002) && ((TIME001 >= TIME002) && (TIME001 <= TIME003)))) Then
:LABEL002
DispFile PPEPath() + "graph\page" + String(INTEGER011), 1 + 4
Tokenize STRING002
INTEGER001 = GetToken()
INTEGER002 = GetToken()
STRING024 = GetToken()
If (LoggedOn()) Goto LABEL003
STRING019 = ""
AnsiPos INTEGER001, INTEGER002
InputText STRING024 + "_", STRING019, 1, 60
If (STRING019 == "") Return
Newline
Goto LABEL004
:LABEL003
STRING019 = Upper(U_Name())
AnsiPos INTEGER001, INTEGER002
Print STRING024, STRING019
:LABEL004
INTEGER001 = GetToken()
INTEGER002 = GetToken()
STRING024 = GetToken()
STRING025 = ""
AnsiPos INTEGER001, INTEGER002
InputText STRING024 + "_", STRING025, 1, 60
If (STRING025 == "") Return
If (BOOLEAN004) Then
STRING028 = "Page reason (" + Upper(STRING025) + ")"
If (!LoggedOn()) STRING028 = STRING028 + " and username (" + Upper(STRING019) + ")"
STRING028 = STRING028 + " entered"
Gosub LABEL013
Endif
AnsiPos INTEGER013, INTEGER014
PrintLn ReplaceStr(STRING006, "%OPTEXT%", String(INTEGER006))
Gosub LABEL011
For INTEGER010 = 1 To INTEGER006
Gosub LABEL012
STRING004 = KInkey()
If (STRING004 == " ") Then
STRING003 = ""
Gosub LABEL011
Chat
PageOff
If (BOOLEAN004) Then
STRING028 = "Page ended normally, exiting at " + String(Time())
Gosub LABEL013
Endif
End
Goto LABEL005
Endif
If (STRING004 == STRING009) Then
INTEGER010 = INTEGER006 + 1
Endif
:LABEL005
If (Abort()) INTEGER010 = INTEGER006 + 1
Next
STRING003 = ""
Gosub LABEL011
If (Abort()) Then
ResetDisp
Newline
If (BOOLEAN004) Then
STRING028 = "Page was aborted by user at " + String(Time())
Gosub LABEL013
Endif
End
Goto LABEL006
Endif
Newline
Endif
Endif
:LABEL006
INTEGER016 = Random(Time())
INTEGER016 = Random(INTEGER015 - 1) + 1
If ((Upper(ReadLine(STRING020, 6)) == "YES") && !BOOLEAN001) Then
BOOLEAN001 = 1
DispFile PPEPath() + "graph\emer" + String(INTEGER016), 1 + 4
AnsiPos INTEGER013, INTEGER014
STRING025 = Upper(NoChar())
InputYN ReadLine(STRING027, 1), STRING025, 7
If (Upper(STRING025) == Upper(YesChar())) Then
AnsiPos INTEGER013, INTEGER014
Print Space(Len(StripAtx(ReadLine(STRING027, 1))) + 5)
AnsiPos INTEGER013, INTEGER014
STRING025 = ""
InputStr ReadLine(STRING027, 2) + "_", STRING025, 1, 60, Mask_Ascii(), 8
If (STRING025 == Upper(ReadLine(STRING020, 7))) Then
If (BOOLEAN004) Then
STRING028 = "Correct emergency page password entered, paging"
Gosub LABEL013
Endif
FreshLine
PrintLn ReadLine(STRING027, 4)
Delay 10
Goto LABEL002
Goto LABEL007
Endif
If (BOOLEAN004) Then
STRING028 = "Incorrect emergency page password entered, not paging"
Gosub LABEL013
Endif
FreshLine
PrintLn ReadLine(STRING027, 5)
Delay 10
PageOn
End
:LABEL007
Goto LABEL008
Endif
End
Endif
:LABEL008
DispFile PPEPath() + "graph\pgno" + String(INTEGER016), 1 + 4
Wait
If (BOOLEAN004) Then
If (BOOLEAN003) Goto LABEL009
STRING028 = "Page bell is off"
Goto LABEL010
:LABEL009
STRING028 = "Unsuccesfull page"
:LABEL010
STRING028 = STRING028 + ", exiting page at " + String(Time())
Gosub LABEL013
Endif
PageOn
Return
:LABEL011
INTEGER001 = GetX()
INTEGER002 = GetY()
SPrint STRING011, STRING012
INTEGER003 = 1
While (1) Do
STRING013 = ReadLine(STRING001, INTEGER003)
If (STRING013 == "") Break
SPrintLn STRING013
Inc INTEGER003
EndWhile
SPrint STRING010 + String(INTEGER002) + ";" + String(INTEGER001) + "H"
Return
:LABEL012
Tokenize STRING015
INTEGER004 = GetX()
INTEGER005 = GetY()
STRING016 = GetToken()
INTEGER003 = 1
While (STRING016 <> "") Do
If (INTEGER003 == INTEGER009) Then
AnsiPos INTEGER004, INTEGER005
Print TSTRING021(INTEGER003)
INTEGER003 = 1
Else
AnsiPos INTEGER004, INTEGER005
Print TSTRING021(INTEGER003)
Inc INTEGER003
Endif
INTEGER008 = STRING016
Sound INTEGER008
Delay GetToken()
STRING016 = GetToken()
EndWhile
Return
:LABEL013
If (LoggedOn()) Goto LABEL014
FPutLn 3, " " + STRING028
Return
:LABEL014
Log STRING028, 0
Return
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 4 End
; 1 Cls
; 2 Wait
; 53 Goto
; 90 Let
; 4 Print
; 4 PrintLn
; 41 If
; 3 DispFile
; 1 FOpen
; 1 FAppend
; 1 FClose
; 1 FPutLn
; 1 ResetDisp
; 1 GetUser
; 1 DefColor
; 1 Log
; 1 InputStr
; 1 InputYN
; 11 Gosub
; 7 Return
; 3 Delay
; 2 Inc
; 3 Newline
; 5 Tokenize
; 2 InputText
; 9 AnsiPos
; 2 FreshLine
; 1 Sound
; 1 Chat
; 2 SPrint
; 1 SPrintLn
; 2 PageOn
; 1 PageOff
; 1 FSeek
; 1 FRead
; 1 Redim
;
;
; ■ Functions used :
;
; 1 -
; 49 +
; 2 -
; 15 ==
; 2 <>
; 3 <
; 3 <=
; 3 >
; 5 >=
; 37 !
; 9 &&
; 3 ||
; 1 Len(
; 11 Upper()
; 1 Space()
; 4 Chr()
; 2 Abort()
; 4 Random()
; 7 Time()
; 1 U_Name()
; 1 NoChar()
; 1 YesChar()
; 1 StripAtx()
; 11 String()
; 1 Mask_Ascii()
; 3 PCBDat()
; 9 PPEPath()
; 1 PcbNode()
; 21 ReadLine()
; 14 GetToken()
; 2 Exist()
; 1 TokenStr()
; 3 LangExt()
; 2 GetX()
; 2 GetY()
; 1 FileInf()
; 1 KInkey()
; 4 LoggedOn()
; 1 TokCount()
; 1 PageStat()
; 1 ReplaceStr()
;
;------------------------------------------------------------------------------
;
; Analysis flags : d
;
; d - Access PCBOARD.DAT ■ 2
; Program gets the full pathname to PCBOARD.DAT, this may be usefull
; for many PPE so they can find various informations on the system
; (system paths, max number of lines in messages, ...) but it may also
; be a way to gather vital informations.
; ■ Search for : PCBDAT()
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 2 For/Next
; 2 While/EndWhile
; 23 If/Then or If/Then/Else
; 1 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------